package com.example.simpleforum.model;

import java.sql.Timestamp;

/**
 * 板块实体类
 */
public class Forum {
    private int id;                 // 板块ID
    private String name;            // 板块名称
    private String description;     // 板块描述
    private int creatorId;          // 创建者ID
    private Timestamp createTime;   // 创建时间
    private Timestamp updateTime;   // 更新时间
    private boolean status;         // 板块状态：true-启用，false-禁用

    // 构造函数
    public Forum() {
    }

    public Forum(String name, String description, int creatorId) {
        this.name = name;
        this.description = description;
        this.creatorId = creatorId;
    }

    // Getter和Setter方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(int creatorId) {
        this.creatorId = creatorId;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Forum{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", creatorId=" + creatorId +
                ", createTime=" + createTime +
                ", status=" + status +
                '}';
    }
}